// RSSParse.h: interface for the CRSSParse class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RSSPARSE_H__F0E8004B_6FCE_4744_912D_D7F7FFCBB939__INCLUDED_)
#define AFX_RSSPARSE_H__F0E8004B_6FCE_4744_912D_D7F7FFCBB939__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Parse.h"

struct ST_BOARD {
	//attr
	DWORD bid_;
	DWORD depth_;
	DWORD child_;
	//node
	CString title_;
	CString author_;
	CString pubdate_;
	CString description_;
	CString link_;
	CString bbslink_;
};

struct ST_TOPIC {
	//attr
	DWORD topicid_;
	DWORD boardid_;
	DWORD postuserid_;
	DWORD child_;
	DWORD hits_;
	//node
	CString title_;
	CString author_;
	CString pubdate_;
	CString description_;
	CString link_;
	CString bbslink_;
};

struct ST_ANNOUNCE {
	//attr
	DWORD announceid_;
	DWORD rootid_;
	DWORD parentid_;
	DWORD postuserid_;
	//node
	CString title_;
	CString author_;
	CString pubdate_;
	CString description_;
	CString link_;
	CString bbslink_;
};

#include "..\..\public\DOMXML\DOMXML.h"

class CRSSParse  
{
public:
	CRSSParse();
	virtual ~CRSSParse();

	bool Init(CString sText);

public:
	CString forum_url_;
	CString page_url_;
	CString title_;
	CString link_;
	CString description_;
	CString language_;
	CString copyright_;
	CString generator_;
	CString webmaster_;
	CString powered_;
	int		pagecount_;
	int		page_;		//curpage for board
	int		star_;		//curstar for topic

public:
	map<DWORD, ST_BOARD> boards_;
	map<DWORD, ST_TOPIC> topics_;
	map<DWORD, ST_ANNOUNCE> announces_;
};

#endif // !defined(AFX_RSSPARSE_H__F0E8004B_6FCE_4744_912D_D7F7FFCBB939__INCLUDED_)
